export function getAllKeysAndProtoKeys_fromObj(obj = {}, flat = 0) {
  let keyStrings = `${
    flat == 0 ? new Array(flat).fill('\t').join('') : ''
  }--------》》start\n`;
  if (obj == null) return '';

  Object.keys(obj).forEach(keyName => {
    keyStrings += `${new Array(flat).fill('\t').join('')}` + keyName + `\n`;
  });

  // console.log(keyStrings, '--', obj, '\n');
  // console.log(flat, '======');

  let prop = Object.getPrototypeOf(obj);

  if (prop != null && Object.keys(prop).length > 0) {
    keyStrings =
      keyStrings +
      `${new Array(flat + 1).fill('\t').join('')}__proto__` +
      getAllKeysAndProtoKeys_fromObj(prop, ++flat);
  } else {
    keyStrings += `--------------------《《end`;
  }

  return keyStrings;
}
